package dk.mirasola.systemtraining.user.shared.transfer;

import com.google.gwt.user.client.rpc.IsSerializable;
import dk.mirasola.systemtraining.bridgewidgets.shared.model.distributionfiltertree.DistributionFilterGroup;

public class UserDistributionFilterTO implements IsSerializable {
    private String id;
    private String name;
    private String description;
    private DistributionFilterGroup distributionFilterGroup;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public DistributionFilterGroup getDistributionFilter() {
        return distributionFilterGroup;
    }

    public void setDistributionFilter(DistributionFilterGroup distributionFilter) {
        this.distributionFilterGroup = distributionFilter;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserDistributionFilterTO that = (UserDistributionFilterTO) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}
